<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <meta charset="utf-8">
    <title>{{$data.title}} - 后台管理</title>
    <link href="{{$smarty.const.APP_URL}}templates/admin/css/admin.css" type="text/css" rel="stylesheet">
    <link href="{{$smarty.const.APP_URL}}templates/admin/js/artDialog/black.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/jquery.cookie.js"></script>
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/artDialog/jquery.artDialog.min.js"></script>
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/admin.js"></script>
    <script type="text/javascript">
        var this_uri = "/admin/order/intention";
    </script>
</head>
<body>

<div id="header">
    <div class="logo"><a href="/admin/"><img src="{{$smarty.const.APP_URL}}templates/admin/images/logo.png" title="后台首页"></a></div>
    <div class="loading"><div id="ajax-loader" title="Ajax数据更新中..."></div></div>
    <div id="topbar">
        <!--顶部菜单 start-->
        {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/topmenu.html"}}
        <!--顶部菜单 end-->
        <!--顶部右侧 start-->
        {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/topuser.html"}}
        <!--顶部右侧 end-->
        <div></div>
    </div>
</div>

<div><!-- 外层添加一个DIV解决IE8下margin-top的问题 -->
    <form name="form1" action="/admin/order/update_intention" method="post">
    <table id="maintable" cellpadding="0" cellspacing="0">
        <tbody><tr>
            <!--左侧菜单 start-->
            {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/leftmenu.html"}}
            <!--左侧菜单 end-->
            <!--主要TD start-->
            <td class="maintd" valign="top">
                <div class="maindiv">
                    <div id="main">
                        <div class="itemtitle">
                            <h3>所有意向</h3>
                            <ul>
                                <a class="link-btn link-live" href="/admin/order/intention">意向列表</a>
                                <!--<a class="link-btn" href="/admin/order/user_add">添加用户</a>-->
                            </ul>
                        </div>
                        <table class="tb">
                                <tbody>
                                <tr>
                                    <td class="tbheader" colspan="38">搜索到的意向列表({{$pager.intention_total}}个)</td>
                                </tr>
                                <tr class="tr0">
                                    <!--<td class="td">排序</td>-->
                                    <td class="td">编号</td>
                                    <td class="td">类型</td>
                                    <td class="td">双方用户</td>
                                    <td class="td">货品分类</td>
                                    <td class="td">总价</td>
                                    <td class="td">状态</td>
                                    <td class="td">操作</td>
                                    <td class="td last">批量删除</td>
                                </tr>
                                {{foreach from=$intention_list item=i key=k}}
                                <tr>
                                    <td class="td"><input type="hidden" value="{{$i.intention_id}}" name="member_ids[]"><a href="#">{{$i.intention_id}}</a></td>
                                    <td class="td"><a href="#">{{if $i.intention_type==1}}采购意向{{/if}}{{if $i.intention_type==2}}供应意向{{/if}}</a></td>
                                    <td class="td">
                                            {{if $i.intention_type==1}}采购方:{{$i.purchase_name}}&lt--&gt 报价方:{{$i.supply_name}}{{/if}}
                                            {{if $i.intention_type==2}}供应方:{{$i.supply_name}}&lt--&gt 采购方:{{$i.purchase_name}}{{/if}}
                                    </td>
                                    <td class="td">{{$i.intention_sort}}</td>
                                    <td class="td">￥{{$i.intention_price*$i.intention_num}}</td>
                                    <td class="td">{{if $i.intention_state==1}}<span class="red">未审核</span>{{/if}}{{if $i.intention_state==2}}<span>已审核</span>{{/if}}</td>
                                    <td class="td"><a href="/admin/order/intention_edit/id/{{$i.intention_id}}">查看/审核</a></td>
                                    <!-- <td class="td">{{$i.order_time|date_format:'%Y-%m-%d %H:%M:%S'}}</td> -->
                                    <td class="td last">
                                        <input type="checkbox" value="{{$i.intention_id}}" name="ids[]">
                                    </td>
                                </tr>
                                {{/foreach}}
                            </tbody>
                            </table>
                        <div class="submit">
                            <input class="save" type="submit" value="保存更新" name="update">
                            <input class="cancel" type="submit" value="删除" onclick="var _me=$(this);$.dialog({title:'操作确认',lock:true,content:'确定删除所选意向吗?<br><br><span class=red>注: 所选意向将被永久删除!</span>',okValue:' 确定 ',ok:function(){_me.closest('form').submit();},cancelValue:'取消',cancel:true});return false;" name="del">
                        </div>
                    </div>
                </div>
            </td>
            <!--主要TD end-->
        </tr>
        </tbody></table>

    </form>
    <!--底部信息 start-->
    {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/sysinfo.html"}}
    <!--底部信息 end-->
</div>

<script type="text/javascript">
    jQuery(document).ready(function() {
        //调整高度
        $("#container").height($(window).height()-40);
        $(window).resize(function() {
            $("#container").height($(window).height()-40);
        });

        App.init();//左侧菜单初始化

        var a101 = $("#topbar"); //顶部下接菜单
        a101.find("dl").Jdropdown({delay: 0}, function(a){});

        //全选checkbox
        $("#checkAll").click(function(e){
            $("input[name='" + $(this).attr("for") + "']").attr("checked", this.checked);
        });
    });
</script>
</body>
</html>